# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name： vertify_data_type
Description :
Author : 'li'
date： 2022/7/12
-------------------------------------------------
Change Activity:
2022/7/12:
-------------------------------------------------
"""
from typing import Iterable


def is_iterable(obj):
    """
     Verify whether the input data can be iterated
    Args:
        obj:

    Returns:

    """
    if isinstance(obj, Iterable):
        return True
    return False


def is_str(obj):
    """

    Args:
        obj:

    Returns:

    """
    if isinstance(obj, str):
        return True
    return False


def is_container(obj):
    """
    Verify whether the input obj is a container
    Args:
        obj:

    Returns:

    """
    return isinstance(obj, (list, tuple))


def is_same_shape(tensor1, tensor2):
    """

    Args:
        tensor1:
        tensor2:

    Returns:

    """
    return tensor1.shape == tensor2.shape
